import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

@SpringBootTest
@Slf4j
public class test {
    /*加密演示*/
    @Test
    void  passwordEncoder(){
        PasswordEncoder  p = new BCryptPasswordEncoder();
        String encode = p.encode("123");
        log.info(encode);
        boolean matches = p.matches("123", encode);
        log.info(matches+"");
    }
}
